﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Header.Master" AutoEventWireup="true"
    CodeBehind="SearchResult.aspx.cs" Inherits="geekmeet.SearchResult" %>

<%@ PreviousPageType VirtualPath="Search.aspx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.bgiframe-2.1.2.js" type="text/javascript"></script>
    <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js" type="text/javascript"></script>
    <script src="../Scripts/geekmeet.js" type="text/javascript"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
  
    <div id="mainWrapper">
        <h1>Sökresultat</h1> <div class="searchResultsContainer">
                    
             <asp:MultiView ID="MultiViewSearch" runat="server">
            
                 <asp:View ID="ViewSoulmateSearchWithMatches" runat="server">
                        
                        <p>
                            Baserat på din profil har vår avancerade algoritm tagit fram följande användare
                            som vi tror kommer passa dig perfekt.</p>
                        <div class="searchResultItemsContainer">
                            <asp:Repeater ID="soulmateRepeater" runat="server">
                            <ItemTemplate>
                                
                                <div class="friendContainer">
                                  <a href='Profile.aspx?user=<%#DataBinder.Eval(Container.DataItem, "matchingUserID")%>'>
                                  <img class="mediumProfileImage" src="/images/profilePictures/<%#(string) DataBinder.Eval(Container.DataItem, "matchingUserID").ToString() %>.jpg" />
                              
                                    <span class="pageSubHeader">
                                        <%#DataBinder.Eval(Container.DataItem, "MatchingUserName")%>
                                        <img src="/images/icons/<%#wcf.GetGender( Guid.Parse(Eval("matchingUserID").ToString()) )%>.png" />
                                        <span class="details"><%#wcf.GetAge(Guid.Parse(Eval("matchingUserID").ToString()))%></span>
                                        <br />
                                        <span class="details"><%#wcf.GetCity(Guid.Parse(Eval("matchingUserID").ToString()))%>
                                        <br />Poäng från Nördometern: </span><%#Eval("MatchPoints") %>
                                    </span>
                                  </a>
                              </div>
                                
                            </ItemTemplate>
                        </asp:Repeater>
                    </div>
                 
                </asp:View>

            <asp:View ID="ViewSoulmateSearchWithoutMatches" runat="server">
            <h2>Tyvärr hittade vi inte din själsfrände</h2>
            <p>Gå in på din profil och lägg in mer information om dig själv, så har du större chans att hitta någon som passar.</p>
            </asp:View>
            <asp:View ID="ViewNormalSearch" runat="server">
                
                        <asp:Label ID="LblNormalSearch" runat="server" Text=""></asp:Label>
                        <asp:Repeater ID="normalSearchRepeater" runat="server">
                            <ItemTemplate>
                                <div class="friendContainer">
                                  <a href='Profile.aspx?user=<%#DataBinder.Eval(Container.DataItem, "UserID")%>'>
                                  <img class="mediumProfileImage" src="/images/profilePictures/<%#(string) DataBinder.Eval(Container.DataItem, "UserID").ToString() %>.jpg" />
                              
                                    <span class="pageSubHeader">
                                        <%#DataBinder.Eval(Container.DataItem, "Username")%>
                                        <img src="/images/icons/<%#wcf.GetGender( Guid.Parse(Eval("UserID").ToString()) )%>.png" />
                                        <span class="details"><%#wcf.GetAge(Guid.Parse(Eval("UserID").ToString()))%></span>
                                        <br />
                                        <span class="details"><%#wcf.GetCity(Guid.Parse(Eval("UserID").ToString()))%></span> </a>
                                 </div>
                            </ItemTemplate>
                        </asp:Repeater>
                    
            </asp:View>
        </asp:MultiView>
        
        </div>
    
    
    </div>
    
</asp:Content>
